<!DOCTYPE html>
<html lang="en" xmlns:zxw="http://www.w3school.com.cn" xmlns:njzxw="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>首页</title>
    <link rel="stylesheet" href="../js/common/layui/css/layui.css">
    <link rel="stylesheet" href="../css/common/animate.css" />
    <link rel="stylesheet" href="../css/common/bootstrap/css/bootstrap.css" />
    <link rel="stylesheet" href="../css/common/bootstrap/treeview/bootstrap-treeview.css" />
    <link rel="stylesheet" href="../css/common/common.css" />
    <style type="text/css">
        .layui-upload-drag img{
            width: 100px;
            height: 100px;
        }
        .layui-field-title{
            border-width: 1px;
            padding: 10px;
            border-radius: 5px;
        }
    </style>
</head>
<body class="layout-zxw" >

    <form action="" id="form1" class="layui-form layui-fluid" lay-filter="form1" >
        <input type="hidden" id="id" name="id" value="" >
        <fieldset class="layui-elem-field layui-field-title">
            <legend>基本信息</legend>
            <div class="layui-row layui-center" >
                <div class="layui-upload-drag" id="upload">
                    <img src="../../../img/headDefout.jpg">
                    <input type="hidden" id="headimg" name="headimg" value="" >
                    <input type="hidden" id="headid" name="headid" value="" >
                    <p>点击上传图像，或将文件拖拽到此处</p>
                </div>
            </div>
            <div class="layui-field-box row">
                <zxw:input id="name" type="text" parcel="true" parcelName="姓名" parcelclass="col-xs-12 col-sm-6" inline="true" value="" maxlength="10" name="name" lay_verify="required" class="" ></zxw:input>
                <zxw:input id="mobile" name="mobile" readonly="readonly" maxlength="11" parcel="true" parcelName="号码" inline="true" parcelclass="col-xs-12 col-sm-6" lay_verify="phone" ></zxw:input>
            </div>
            <div class="layui-field-box row">
                <zxw:input id="email" type="text" readonly="readonly" name="email" lay_verify="email" inline="true" parcelclass="col-xs-12 col-sm-6" parcel="true" parcelName="email" ></zxw:input>
                <zxw:input id="bir" name="bir" type="date" lay_verify="date" inline="true" parcelclass="col-xs-12 col-sm-6" parcel="true" parcelName="生日" ></zxw:input>
            </div>
            <zxw:textarea id="addr" name="addr" placeholder="请输入内容" parcel="true" parcelName="地址" ></zxw:textarea>
        </fieldset>
        <fieldset class="layui-elem-field layui-field-title">
            <legend>权限与组织</legend>
            <div class="layui-row layui-center" >
                <div class="layui-inline col-xs-12 col-sm-6 ">
                    <label class="layui-form-label">角色</label>
                    <label class="layui-form-label rolediv"></label>
                </div>
                <div class="layui-inline col-xs-12 col-sm-6 ">
                    <label class="layui-form-label">组织</label>
                    <label class="layui-form-label orgdiv"></label>
                </div>
            </div>
        </fieldset>
    </form>

    <script type="application/javascript" src="../js/common/own/own.js?layui,jquery,treeview,njzxw,URL,adduser" >
        njzxw.layui.val({
            url:URL.USER.GETMAP,
            data:{
                id:njzxw.cookie.getCookie('id')
            },
            fun:function(data){
                $('#upload img').attr('src',data.head_img);
                $('#headid').val(data.headimg);
                $('#headimg').val('');
                $('.rolediv').text(data.role_name);
                $('.orgdiv').text(data.org_name);
            }
        });
        njzxw.layui.submit({
            url:URL.USER.SAVEUSER
        });
        adduser.init();
    </script>
</body>
</html>